package com.java.business.jxc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.java.business.jxc.bean.B_BUILDER;
import com.java.business.jxc.dao.BuilderMapper;
import com.java.core.utils.IdUtils;

@Transactional
@Service
public class BuilderService {

	@Autowired
	private BuilderMapper mapper;

	public void add(B_BUILDER builder) {
		builder.setBuilder_id(IdUtils.uuid());
		mapper.add(builder);
	}

	public void update(B_BUILDER builder) {
		mapper.update(builder);
	}

	public void setDisabled(B_BUILDER builder) {
		mapper.setDisabled(builder);
	}

	public void delete(String builder_id) {
		mapper.delete(builder_id);
	}

	public B_BUILDER getBuilderById(String builder_id) {
		return mapper.getBuilderById(builder_id);
	}

	public List<B_BUILDER> getBuilderList(B_BUILDER builder) {
		return mapper.getBuilderList(builder);
	}
}
